package com.xncoding.pos.controller;

import org.eclipse.jgit.revwalk.filter.RevFilter;
import org.gitective.core.CommitFinder;
import org.gitective.core.filter.commit.AndCommitFilter;
import org.gitective.core.filter.commit.CommitListFilter;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class HelloWorldController {
    @RequestMapping(value = "/")
    public void hello(String name){
        CommitFinder finder = new CommitFinder("/repos/linux-2.6/.git");
        CommitListFilter listFilter = new CommitListFilter();
        finder.setFilter(new AndCommitFilter(RevFilter.MERGE_BASE, listFilter)).find();
    }

    public void test1(){
        test2();
        System.out.println("test1");
    }

    public void test2(){
        test3();
        System.out.println("test2");
    }

    public void test3(){

        System.out.println("test3");
    }


    public void testmerge(){
        System.out.println("testmerge");
    }


    public void test4(){
        System.out.println("testtttt");
    }

    public void test5(){
        System.out.println("testtttt");
    }
}
